import java.util.Scanner;

/**
 * @Author liangzai
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        String str = ", , , ,        a, eaefa";
        String[] ret = str.split(" ");
        System.out.println(ret.length);
    }

    public String toLowerCase(String s) {
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i< s.length();i++) {
            char ch = s.charAt(i);
            //是不是字母
            if(Character.isLetter(ch)) {
                //是不是大写
                if(!Character.isLowerCase(ch)) {
                    ch = (char)(ch + 32);
                }
            }
            sb.append(ch);
        }
        return sb.toString();
    }

    public int countSegments(String s) {
        if(s.length() == 0) {
            return 0;
        }
        int count = 0;
        String[] str = s.split(" ");
        for(String ss : str) {
            if(ss.length() != 0) {
                count++;
            }
        }
        return count;
    }
    public static String Func(String str) {
        boolean[] flgs = new boolean[127];
        StringBuilder stringBuilder = new StringBuilder();
        for(int i = 0;i < str.length();i++) {
            char ch = str.charAt(i);
            if(flgs[ch] == false) {
                stringBuilder.append(ch);
                flgs[ch] = true;
            }
        }

        return stringBuilder.toString();
    }

    public void merge(int A[], int m, int B[], int n) {
        int i = m-1;
        int j = n-1;
        int k = m+n-1;
        //当两个数组都有数据的时候
        while(i >= 0 && j >= 0) {
            if(A[i] >= B[j]) {
                A[k] = A[i];
                k--;
                i--;
            }else {
                A[k] = B[j];
                k--;
                j--;
            }
        }
        while(i >= 0) {
            A[k] = A[i];
            k--;
            i--;
        }
        while(j >= 0){
            A[k] = B[j];
            k--;
            j--;
        }
    }

    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str = in.nextLine();
            String ret = Func(str);
            System.out.println(ret);
        }
    }
}
